package spring.DI.ltw;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.ApplicationContext;
import spring.DI.IndexService2;

@Configurable
public class IndexServiceMyself {

    @Autowired
    private ApplicationContext context;

    @Autowired
    private IndexService2 indexServiceImpl2;

    public void service() {
        System.out.println("\n@Configurable: 给自己 new的对象 注入Spring依赖");
        System.out.println(context);
        System.out.println(indexServiceImpl2);
        System.out.println();
    }
}
